﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;

namespace ArgusLib
{
	public static class Environment
	{
		public static Runtime Runtime { get; private set; }
		public static Version ArgusLibVersion { get; private set; }

		static Environment()
		{
			if (Type.GetType("Mono.Runtime") != null)
				Environment.Runtime = ArgusLib.Runtime.Mono;
			else
				Environment.Runtime = ArgusLib.Runtime.CLR;

			Environment.ArgusLibVersion = Environment.GetAssemblyVersion();
		}

		public static Version GetAssemblyVersion()
		{
			Assembly assembly = Assembly.GetCallingAssembly();
			return assembly.GetName().Version;
		}
	}

	public enum Runtime : byte
	{
		CLR,
		Mono
	}
}
